#ifndef COLLADA_DATA_H_
#define COLLADA_DATA_H_

namespace Collada
{

	class Data;
	class Geometry;
	class Scene;

	class Data : public Element
	{
	friend Data* LoadFromFile( const std::string& path );

	DECLARE_RTTI( Collada::Data, Collada::Element )
	DECLARE_ELEMENT( Collada::Data )

	public :
		typedef std::vector< Element* >								LibraryList;
		typedef std::vector< Element* >::iterator					LibraryListIter;
		typedef std::map< Fundamental::ID, LibraryList >			LibraryMgr;
		typedef std::map< Fundamental::ID, LibraryList >::iterator	LibraryMgrIter;

		~Data();

		bool						AddLibrary( ID libraryId, Element* library );
		bool						AddScene( Scene* pScene ){ _pScene = pScene; return true; }

		Geometry*					GetGeometry( ID geomId );
		VisualScene*				GetVisualScene( ID visualSceneId );
		Scene*						GetScene(){ return _pScene; }

		void						SetScene( Scene* pScene ){ _pScene = pScene; }
	private :
		Data( const std::string& id, const std::string& name );

		LibraryMgr					_libraryMgr;
		Scene*						_pScene;
	};

};

#endif